package com.oraro.paygatewaybiz.channel.alipay.interfaces;

import com.oraro.common.result.Result;
import com.oraro.paygatewaybiz.constant.Constants;
import com.oraro.paygatewaybiz.module.entity.ChannelEntity;
import com.oraro.paygatewaybiz.module.entity.OrderEntity;
import com.oraro.plugin.inter.IPlugin;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: jianghuiyong
 * @Date: 2018/11/15 21:21
 * @Version 1.0
 */
public interface AliPayService extends IPlugin {

    Result payOrder(OrderEntity orderEntity, ChannelEntity channelEntity);

    default Map<String, Object> getParam (Object type) {
        Map<String, Object> map = new HashMap<>();
        map.put(Constants.TYPE, Constants.tradePrefix.ALI.getType() + type);
        return map;
    }
}
